<div id="comments">
<h3 class="commentSum"><?php post('comments')?> 条评论</h3>


<?php if ( have_comment() ) : ?>

	<?php while ( fetch_comment() ) : ?>

	<div class="userComment">
	<a name="comment-<?php comment('id') ?>"></a>
	<a href="javascript:;" style="float:right" onclick="reply_comment('<?php comment('id') ?>','<?php comment('author') ?>')">回复</a>
	<span><?php comment('avatar') ?></span>
	<h5 id="comment-<?php comment('id') ?>"><?php comment('author_link') ?> </h5>
	<p class="commentDate"><?php comment('posttime')?></p>
	<p><?php comment('content')?></p>
	</div>

<?php endwhile; ?>

<?php endif; ?>

<h3>发表评论</h3>
<form action="<?php blog('blogdir')?>do.php?ac=postcomment" method="post" id="commentform" name="commentform">
	<input type="hidden" name="comment_postid" value="<?php post('id')?>" />
	<?php if ( $_USER['id'] ) : ?>
	<p>您好，当前你正使用 <strong><?php echo $_USER['name'];?></strong> 登录&nbsp;&nbsp;&nbsp;<a href="user.php?ac=logout" title="Log out of this account">退出登录</a></p>
	<?php else : ?>
	<p><input type="text" name="comment_author" id="comment_author" value="" size="22" tabindex="1" />
	<label for="author"><small>名称</small></label></p>
	<p><input type="text" name="comment_email" id="comment_email" value="" size="22" tabindex="2" />
	<label for="email"><small>邮箱</small></label></p>
	<p><input type="text" name="comment_url" id="comment_url" value="" size="22" tabindex="3" />
	<label for="url"><small>主页</small></label></p>
	<?php endif; ?>
	<p><textarea name="comment_content" id="comment_content" cols="60" rows="7" tabindex="4"></textarea></p>
	<p><input name="submit" type="submit" id="submit" tabindex="5" value="好了，发射！" />
	</p>
</form>
<script type="text/javascript">
	<!--//--><![CDATA[//><!--
	var commenttextarea = document.getElementById('comment_content');
	commenttextarea.onkeydown = function quickSubmit(e) {
	if (!e) var e = window.event;
	if (e.ctrlKey && e.keyCode == 13){
	document.getElementById('submit').click();
	}
	};
	//--><!]]>
</script>
</div><!-- close: comments -->